﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Stonecode.Solar.ParticleEngine.Collections;
using Stonecode.Solar.ParticleEngine.Emitters;
using Microsoft.Xna.Framework.Content;
using System.Xml;

namespace Stonecode.Solar.ParticleEngine.Data
{
    class EmitterCollectionReader : ContentTypeReader<EmitterCollectionInfo>
    {
        protected override EmitterCollectionInfo Read(ContentReader input, EmitterCollectionInfo existingInstance)
        {
            XmlDocument doc = new XmlDocument();
            doc.Load(input.BaseStream);

            Stonecode.Solar.ParticleEngine.Data.ParticleEffectImporter.GetInfoFromXml(doc, out existingInstance);
            
            return existingInstance;
        }
    }

    
}
